﻿<navigation:Page 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:Microsoft_Internal_Pivot_Controls="clr-namespace:Microsoft.Internal.Pivot.Controls;assembly=System.Windows.Controls.Pivot" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:ee="http://schemas.microsoft.com/expression/2010/effects" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" x:Class="ScrumBoard.Views.Welcome"    
           mc:Ignorable="d"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="Welcome To ScrumBoard">
	<navigation:Page.Resources>
		<ControlTemplate x:Key="HeaderedContentControlControlTemplate1" TargetType="Microsoft_Internal_Pivot_Controls:HeaderedContentControl">
			<Border BorderThickness="1" Padding="10" BorderBrush="{StaticResource ImportantForeground}">
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition Height="Auto" />
						<RowDefinition Height="*" />
					</Grid.RowDefinitions>
					<ContentControl Content="{TemplateBinding Header}" FontSize="36" Margin="0,0,0,10" Foreground="{StaticResource ImportantForeground}" />
					
					<Rectangle Height="1" Fill="{StaticResource ImportantForeground}" Grid.Row="1" VerticalAlignment="Top" />
					
					<ContentControl Content="{TemplateBinding Content}" Margin="0,11,0,0" Grid.Row="1" Foreground="#4b5657" FontFamily="{StaticResource DefaultFontFamily}" FontSize="16" HorizontalContentAlignment="Stretch" />
				</Grid>
			</Border>
		</ControlTemplate>
	</navigation:Page.Resources>
	<navigation:Page.FontFamily>
		<StaticResource ResourceKey="DefaultFontFamily"/>
	</navigation:Page.FontFamily>
	<Grid x:Name="LayoutRoot">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="VisualStateGroup">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="0:0:0.3" To="Hidden">
						<ei:ExtendedVisualStateManager.TransitionEffect>
							<ee:RadialBlurTransitionEffect/>
						</ei:ExtendedVisualStateManager.TransitionEffect>
					</VisualTransition>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="Welcome1">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="welcome">
							<DiscreteObjectKeyFrame KeyTime="0:0:0.2">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="login">
							<DiscreteObjectKeyFrame KeyTime="0:0:0.2">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="login">
							<EasingDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
							<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-90"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="welcome">
							<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="90"/>
							<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Login">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="welcome">
							<DiscreteObjectKeyFrame KeyTime="0:0:0.2">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="login">
							<DiscreteObjectKeyFrame KeyTime="0:0:0.2">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="welcome">
							<EasingDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
							<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="90"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="login">
							<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-90"/>
							<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Hidden">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="login">
							<DiscreteObjectKeyFrame KeyTime="0">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="welcome" d:IsOptimized="True"/>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
        
		<VisualStateManager.CustomVisualStateManager>
			<ei:ExtendedVisualStateManager/>
		</VisualStateManager.CustomVisualStateManager>
        
		<Microsoft_Internal_Pivot_Controls:HeaderedContentControl x:Name="welcome" Header="Welcome to ScrumBoard" HorizontalAlignment="Center" VerticalAlignment="Center" Template="{StaticResource HeaderedContentControlControlTemplate1}"  Width="600">
			<Microsoft_Internal_Pivot_Controls:HeaderedContentControl.Projection>
				<PlaneProjection/>
			</Microsoft_Internal_Pivot_Controls:HeaderedContentControl.Projection>
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="30" />
					<RowDefinition Height="50" />
				</Grid.RowDefinitions>
				<ScrollViewer Height="300">
					<StackPanel>
						<TextBlock Text="This is just prototype of silverlight application. It demostrates fluid user interface on the ScrumBoard sample application." TextWrapping="Wrap" />
						<TextBlock Text="You can rightclick anywhere in the application and choose install to run it out of browser" TextWrapping="Wrap" Margin="0,5" />
						<TextBlock Text="All sources are available on codeplex:" TextWrapping="Wrap" />
						<HyperlinkButton Content="http://onlinescrumboard.codeplex.com" Click="HyperlinkButton_Click" />
						<TextBlock Text="Application is avalilable under Microsoft Public License (Ms-PL)"  TextWrapping="Wrap" Margin="0,5"  />
						<TextBlock 	TextWrapping="Wrap" FontSize="12"	><Run Text="This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software."/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" 1. Definitions"/><LineBreak/><Run Text=" The terms 'reproduce,' 'reproduction,' 'derivative works,' and 'distribution' have the same meaning here as under U.S. copyright law."/><LineBreak/><Run Text=" A 'contribution' is the original software, or any additions or changes to the software."/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" A 'contributor' is any person that distributes its contribution under this license."/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" 'Licensed patents' are a contributor's patent claims that read directly on its contribution."/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" 2. Grant of Rights"/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create."/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software."/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" 3. Conditions and Limitations"/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks."/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically."/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software."/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license."/><LineBreak/><Run Text=" "/><LineBreak/><Run Text=" (E) The software is licensed 'as-is.' You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.&quot; "/><LineBreak/></TextBlock>
						
							
					</StackPanel>
				</ScrollViewer>	
					
				<CheckBox x:Name="chbxAccept" Content="Accept licence" Grid.Row="1" VerticalAlignment="Center"  VerticalContentAlignment="Center" Padding="5,-2,0,0" Foreground="{StaticResource ImportantForeground}" />
						
				<Rectangle Height="1" VerticalAlignment="Top" Grid.Row="2" Fill="{StaticResource ImportantForeground}" />
				<Button Margin="1" HorizontalAlignment="Right" Content="Continue" Grid.Row="2"  Width="100" 
					IsEnabled="{Binding IsChecked, ElementName=chbxAccept}" >
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="Click">
							<ei:GoToStateAction StateName="Login"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
				</Button>
			</Grid> 	
		</Microsoft_Internal_Pivot_Controls:HeaderedContentControl>
			
			
			
		<Microsoft_Internal_Pivot_Controls:HeaderedContentControl Visibility="Collapsed" x:Name="login" Header="Login" HorizontalAlignment="Center" VerticalAlignment="Center" Template="{StaticResource HeaderedContentControlControlTemplate1}"  Width="500">
			<Microsoft_Internal_Pivot_Controls:HeaderedContentControl.Projection>
				<PlaneProjection/>
			</Microsoft_Internal_Pivot_Controls:HeaderedContentControl.Projection>
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="30" />
					<RowDefinition Height="50" />
				</Grid.RowDefinitions>

						
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition />
						<RowDefinition Height="10" />
						<RowDefinition />
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto" />
						<ColumnDefinition Width="10" />
						<ColumnDefinition />
					</Grid.ColumnDefinitions>
							
					<TextBlock FontSize="20" Text="user name:" />
					<TextBlock FontSize="20" Text="password:" Grid.Row="2" />
							
					<TextBox x:Name="tbxUserName"  Grid.Column="2"  FontSize="18" TextChanged="tbxUserName_TextChanged" />
					<TextBox  Grid.Column="2" Grid.Row="2" FontSize="18" />
				</Grid>
						
				<Rectangle Height="1" VerticalAlignment="Top" Grid.Row="2" Fill="{StaticResource ImportantForeground}" />
						
				<StackPanel HorizontalAlignment="Right" Orientation="Horizontal"  Grid.Row="2">
					<i:Interaction.Behaviors>
						<ei:FluidMoveBehavior AppliesTo="Children" Duration="0:0:0.3">
							<ei:FluidMoveBehavior.EaseX>
								<BackEase EasingMode="EaseOut" Amplitude="0.1"/>
							</ei:FluidMoveBehavior.EaseX>
						</ei:FluidMoveBehavior>
					</i:Interaction.Behaviors>
					<Button Margin="1" HorizontalAlignment="Right" Content="Back" Width="100" >
						<i:Interaction.Triggers>
							<i:EventTrigger EventName="Click">
								<ei:GoToStateAction StateName="Welcome1"/>
							</i:EventTrigger>
						</i:Interaction.Triggers>
					</Button>
					<Button x:Name="btnLogin" Margin="1" IsEnabled="False" HorizontalAlignment="Right" Content="Login"  Width="100" Click="btnLogin_Click">
						<i:Interaction.Triggers>
							<i:EventTrigger EventName="Click">
								<ei:GoToStateAction StateName="Hidden"/>
							</i:EventTrigger>
						</i:Interaction.Triggers>
					</Button>
				</StackPanel>
						
						
			</Grid> 	
		</Microsoft_Internal_Pivot_Controls:HeaderedContentControl>
        
	</Grid>
</navigation:Page>
